#include "Timer.hpp"
using namespace std::chrono;
void Timer::recordTimePoint()
{
    last_time_point = std::chrono::steady_clock::now();
    this->started=true;
}

long long Timer::getElapsedMilliseconds()
{
    if(!started)    return 0;
    return duration_cast<milliseconds>(steady_clock::now()-last_time_point).count();
}

double Timer::getElapsedSeconds()
{
    if(!started)    return 0;
    return duration_cast<seconds>(steady_clock::now()-last_time_point).count();
}

bool Timer::isStarted()
{
    return this->started;
}
